package com.zkthink.ceres.promotion.service;

import com.zkthink.base.R;
import com.zkthink.base.service.SuperService;
import com.zkthink.ceres.promotion.dto.PromotionStatDTO;
import com.zkthink.ceres.promotion.dto.PromotionTenantStatDTO;
import com.zkthink.ceres.promotion.entity.PromotionStat;

/**
 * <p>
 * 业务接口
 * 
 * </p>
 *
 * @author JustArgo
 * @date 2020-06-30
 */
public interface PromotionStatService extends SuperService<PromotionStat> {

    /**
     * 下单的时候，新增统计信息
     * @param promotionStat
     */
    void addPromotionStat(PromotionStat promotionStat);

    /**
     * 查询活动的统计数据
     * @param promotionId
     * @return
     */
    R<PromotionStatDTO> getPromotionStatDetail(Long promotionId);

    /**
     * 查询活动下店铺的统计数据
     * @param promotionId
     * @return
     */
    R<PromotionTenantStatDTO> findTenantStatDetail(Long promotionId, Integer pageIndex, Integer pageSize);

    /**
     * 订单支付之后，将统计数据也标记为已支付
     * @param orderCode
     * @return
     */
    void payOrder(String orderCode);
}
